﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Diagnostics;

namespace DVK.SP2007
{
    /// <summary>
    /// Helper methods for all feature receivers in the project.
    /// </summary>
    public class FeatureReceiverHelper
    {
        /// <summary>
        /// Creates the event log source into "Application" log.
        /// </summary>
        /// <param name="sourceName">Name of the source.</param>
        public static void CreateEventLogSource(string sourceName)
        {
            if (!EventLog.SourceExists(sourceName))
                EventLog.CreateEventSource(sourceName, "Application");
        }
    }
}
